import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import { quasar, transformAssetUrls } from '@quasar/vite-plugin'
import { nodePolyfills } from 'vite-plugin-node-polyfills'

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [
    vue({
      template: { transformAssetUrls }
    }),
    quasar(),
    nodePolyfills()
  ],
  define: {
    // Add this to handle browser environment
    'process.env.DASHSCOPE_API_KEY': JSON.stringify('sk-11684e23a93c45eca49b9f6f171889fa')
  }
})
